#include "gp2x.h"

int main(int argc, char* argv[]) {
    void* ptr1;
    void* ptr2;
    void* ptr3;

    GP2x_init(GP2x_INIT_ALL);

    ptr1 = GP2x_upper_memory_malloc(1024);
    ptr2 = GP2x_upper_memory_malloc(1024);
    ptr3 = GP2x_upper_memory_malloc(1024);

    GP2x_upper_memory_free(ptr1);
    GP2x_upper_memory_free(ptr2);
    GP2x_upper_memory_free(ptr3);
    ptr2 = GP2x_upper_memory_malloc(512);
    GP2x_upper_memory_free(ptr2);

    GP2x_finalize();
}
